﻿using Domain.Entity;
using System.Collections.Generic;
using Business.Abstract;
using Business.Service;
using Domain.Common;

namespace PresentationMVC.Models
{

    public class CustomerDataModel : AbstractModel
    {
        public CustomerDataModel()
        {
        }

        public Customer Customer
        {
            get;
            set;
        }

       
        public IList<Customer> AllCustomer
        {
            get;
            set;
        }

        //public IList<Title> AllTitle
        //{
        //    get
        //    {
        //        ICommonService srv = new CommonServiceImpl();
        //        return srv.GetAllTitle();
        //    }
        //}

        //public IList<Country> AllCountry
        //{
        //    get
        //    {
        //        ICommonService srv = new CommonServiceImpl();
        //        return srv.GetAllCountry();
        //    }
            
        //}


        public IList<KeyValPair> Columns
        {
            get
            {
                IList<KeyValPair> lst = new List<KeyValPair>();
                lst.Add(new KeyValPair { Key="FirstName", Value="First Name"});
                lst.Add(new KeyValPair { Key = "LastName", Value = "Last Name" });
                lst.Add(new KeyValPair { Key = "CompanyName", Value = "Company Name" });
                lst.Add(new KeyValPair { Key = "AddressLine1", Value = "Address Line1" });
                lst.Add(new KeyValPair { Key = "AddressLine2", Value = "Address Line2" });
                lst.Add(new KeyValPair { Key = "City", Value = "City" });
                lst.Add(new KeyValPair { Key = "Postcode", Value = "Postcode" });
                lst.Add(new KeyValPair { Key = "Email", Value = "Email" });
                return lst;
            }
        }

        public CustomerSearchModel CustomerSearch
        {
            get;
            set;
        }
    }

    public class CustomerSearchModel
    {
        public string SearchBy
        {
            get;
            set;
        }

        public string Value
        {
            get;
            set;
        }
    }
}

